<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript">
			var p;
			function mouseOverFn(){
				
				p.style.color ="blue";
				p.style.fontsize = "30px";
				p.style.fontStyle = "italic";
				p.style.textDecoration = "underline";
			}
			function mouseOutFn(){
				p.style.color = "red";
				p.style.fontStyle = "normal";
				p.style.textDecoration = "none";
			}
			window.onload = function(){
				var p = document.getElementById("P");
//				p.addEventListener("click",function(){alert("单击事件");},false);
				p.addEventListener("mouseover",mouseOverFn,false);
//				p.addEventListener("mouseout",mouseOutFn,false);
//				p.addEventListener("click",function(){alert("使用addEventListener()注册事件处理程序");},false);
			}
		</script>
	</head>
	<body>
		<p id="P">Hello World</p>
	</body>
</html>
